{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_tcwq/template/public/ygcsslist.css">
<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>    
    <li class="active"><a href="{php echo $this->createWebUrl('acttype')}">分类管理</a></li>
    <li><a href="{php echo $this->createWebUrl('addacttype')}">添加分类</a></li>
</ul>
<div class="main">   
    </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                分类管理
            </div>
            <div class="panel-body" style="padding: 0px 15px;">
                <div class="row">
                    <table class="yg5_tabel col-md-12">
                        <tr class="yg5_tr1">
                        <td class="store_td1 col-md-1">id</td>
                            <td class="store_td1 col-md-1">顺序</td>

                            <td class="col-md-2">分类名称</td>
                           <td class="col-md-2">分类图标</td>
                            <td class="col-md-2">状态</td>
                            <td class="col-md-2">操作</td>
                        </tr>
                        {loop $list $row}
                        <tr class="yg5_tr2">
                        <td>{$row['id']}</td>
                            <td class="num{$row['id']}">
                            	<span class="numspan{$row['id']}">{$row['num']}</span>
                        		<input style="display: none;width: 100%;" type="number" name="num{$row['id']}" class="numinp{$row['id']}" value="{$row['num']}" />
                            </td>
                            <td>{$row['type_name']}</td>
                             <td><div class="type-parent"><img height="40" src="{media $row['img']}">&nbsp;&nbsp;</div></td>
                            <td>{if $row['state']==1} <span class="label storeblue">  <a href="{php echo $this->createWebUrl('acttype', array('id' => $row['id'],'op'=>change,'state'=>2))}"   >启用</a></span>{elseif $row['state']==2} <span class="label storegrey"><a href="{php echo $this->createWebUrl('acttype', array('id' => $row['id'],'op'=>change,'state'=>1))}">禁用</a></span>{/if}</td>
                            <td>
                                <a href="{php echo $this->createWebUrl('addacttype', array('id' => $row['id']))}" class="storespan btn btn-xs">
                                    <span class="fa fa-pencil"></span>
                                    <span class="bianji">编辑
                                        <span class="arrowdown"></span>
                                    </span>                            
                                </a>
                                <a href="javascript:void(0);" class="storespan btn btn-xs" data-toggle="modal" data-target="#myModal{$row['id']}">
                                    <span class="fa fa-trash-o"></span>
                                    <span class="bianji">删除
                                        <span class="arrowdown"></span>
                                    </span>
                                </a>
                            <!-- <a class="btn btn-warning btn-xs" href="{php echo $this->createWebUrl('addtype', array('id' => $row['id']))}" title="编辑">改</a>&nbsp;&nbsp;
                           <button type="button" class="btn btn-danger btn-xs" data-toggle="modal" data-target="#myModal{$row['id']}">删</button> -->
                            </td>
                        </tr>
                         <div class="modal fade" id="myModal{$row['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                      <div class="modal-dialog" role="document">
                        <div class="modal-content">
                          <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
                        </div>
                        <div class="modal-body" style="font-size: 20px">
                            确定删除么？
                        </div>
                        <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <a href="{php echo $this->createWebUrl('acttype', array('id' => $row['id'],'op'=>'delete'))}" type="button" class="btn btn-info" >确定</a>
                        </div>
                    </div>
                </div>
            </div>
                        {/loop}
                       
                    </table>
                </div>
            </div>
        </div>
    {$pager}
</div>
<script type="text/javascript">
    $(function(){
        $("#frame-20").show();
        $("#yframe-20").addClass("wyactive");

       
    })
</script>{template 'common/footer'}